﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using ClassLibrary.DAO;
using ClassLibrary.Entity;

public partial class Admin_UserControl_ucAddGroupItem : System.Web.UI.UserControl
{
    TblGroupDAO GroupDAO = new TblGroupDAO(Global.CONNECTION_STRING);
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            this.ViewState["SelectedText"] = "All";
            load_Group();
            DetailCate();
        }
       
    }
    public void load_Group()
    {
        grdGroup.DataSource = GroupDAO.GetGroup();
        grdGroup.DataBind();
    }
    public void DetailCate()
    {
     
        string id = Request.QueryString["id"];
        if (id == null)
        {

        }
        else
        {

            TblGroup group = GroupDAO.GetGroupID(Global.ConvertToInt(id));
            txtGroupName.Text = group.GroupName.ToString();

    
        }
    }
    protected void btAdd_Click(object sender, EventArgs e)
    {

    }
}
